<template>
  <div class="first-app">
    {{ msg }}
    <confirm :text="msg" @message="getMessage"></confirm>
    <router-link to="/second">去第二个页面</router-link>
    <router-link to="/first/confirm">去第三个页面</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
import Confirm from "../sub/Confirm";
export default {
  name: "First",
  components: {
    Confirm
  },
  data() {
    return {
      msg: "Welcome to FirstApp",
    };
  },
  methods: {
    getMessage(val) {
      alert(val);
    },
  },
};
</script>

<style>
</style>